From: Dmitry Gutov Date: Tue, 3 May 2016 21:42:43 +0000 (+0300) Subject: Clear buffer-undo-list when showing xrefs X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~23^2~269 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6f82d8e;p=emacs.git Clear buffer-undo-list when showing xrefs * lisp/progmodes/xref.el (xref--show-xref-buffer): Clear buffer-undo-list and temporarily bind it to t while rendering the buffer contents. --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index b5632af13ab..540c7b0e925 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -687,7 +687,9 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (defun xref--show-xref-buffer (xrefs alist) (let ((xref-alist (xref--analyze xrefs))) (with-current-buffer (get-buffer-create xref-buffer-name) - (let ((inhibit-read-only t)) + (setq buffer-undo-list nil) + (let ((inhibit-read-only t) + (buffer-undo-list t)) (erase-buffer) (xref--insert-xrefs xref-alist) (xref--xref-buffer-mode)